package us.wili.dev.common.util.xinge.v2;

import us.wili.dev.common.util.httpclient.ConnectionManagerProperties;
import us.wili.dev.common.util.httpclient.HttpClientUtil;
import us.wili.dev.common.util.httpclient.RequestProperties;
import us.wili.dev.common.util.xinge.v2.service.iface.PushService;
import us.wili.dev.common.util.xinge.v2.service.impl.PushServiceImpl;

/**
 * author: lefore
 * date: 2018/8/29
 */
public class XinGeUtil {

    private XinGeProperties xinGeProp;
    private PushService pushService;

    public XinGeUtil(XinGeProperties xinGeProp) {
        // 由于该工具类集成到 hulk 中，直接使用 hulk 的网络请求工具，使用默认参数
        RequestProperties requestProperties = new RequestProperties();
        ConnectionManagerProperties connectionManagerProperties = new ConnectionManagerProperties();
        HttpClientUtil httpClientUtil = new HttpClientUtil(requestProperties, connectionManagerProperties);

        this.xinGeProp = xinGeProp;
        this.pushService = new PushServiceImpl(xinGeProp, httpClientUtil);
    }


    public XinGeProperties getXinGeProp() {
        return xinGeProp;
    }

    public PushService getPushService() {
        return pushService;
    }

}